"""
@author: niweinan
@file: 11.17作业-倪炜楠.py.py
@time: 2023/11/19 20:38
"""


# 统计出现次数最多的字符，以及每个字符出现的次数都输出一下
# str1=input("输入任意字符：")
# total={}
# for i in str1:
#     count = str1.count(i)
#     total[i] = count
# print(total)


# 字符串压缩
# str2=input("输入任意字符：")
# list=[]
# str3=""
# for i in str2:
#     if i in list:
#         continue
#     else:
#         list.append(i)
#         count = str2.count(i)
#         str3 = str3 + i + str(count)
# print(str3)


# 统计字符串中大写字母、小写字母、数字、其他字符的个数
str4=input("输入任意字符：")
count_sup = 0
count_low = 0
count_num = 0
count_other = 0

for i in str4:
    if i.isupper():
        count_sup +=1
    elif i.islower():
        count_low +=1
    elif i.isdigit():
        count_num +=1
    else:
        count_other +=1
print("大写字母数量：{}，小写字母数量：{}，数字数量：{}，其它字符数量：{}".format(count_sup, count_low, count_num, count_other))